package SingletonPattern;

public class HungrySingleton {

    private static final HungrySingleton singleton = new HungrySingleton();

    public static HungrySingleton getSingleton(){
        return singleton;
    }

    private HungrySingleton(){

    }

    public void fun(){
        System.out.println("饿汉式单例");
    }
}
